<template>
  <div class="">
    <van-nav-bar title="购物车" left-text="<" right-text="..." />

   
    <van-card
      v-for="(item, index) in list"
      :key="index"
      :num="item.null"
      :price="item.price"
      :title="item.title"
      thumb="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fgd4.alicdn.com%2Fimgextra%2Fi4%2F477758%2FT2uIIfXbJbXXXXXXXX_%21%21477758.jpg&refer=http%3A%2F%2Fgd4.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1632659216&t=8b25448d08092c0b2df02fd6bc84c9db"
      @click="tz(item)"
    >
      <template #footer>
        <van-button size="mini" >加入购物车</van-button>

      </template>
    </van-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
    };
  },
  mounted() {
    this.$axios.get("list.json").then((res) => {
      this.list = res.data.data;
    });
  },
  methods: {
    tz(item){
      this.$router.push({path:'/about',query:{obj:item}})
    }
  },
  components: {},
};
</script>

<style lang='scss'>
</style>
